"""

"""

import pandas as pd;
import numpy as np;
import matplotlib.pyplot as plt

dates = pd.date_range('2020-01-01', periods=6)
df = pd.DataFrame(
    np.arange(24).reshape(6, 4),
    index=dates,
    columns=['A', 'B', 'C', 'D']
)
left = pd.DataFrame({
    'key1': ['K0', 'K0', 'K1', 'K2'],
    'key2': ['K0', 'K1', 'K0', 'K1'],
    'A': ['A0', 'A1', 'A2', 'A3'],
    'B': ['B0', 'B1', 'B2', 'B3']
})
right = pd.DataFrame({
    'key1': ['K0', 'K1', 'K1', 'K2'],
    'key2': ['K0', 'K0', 'K0', 'K0'],
    'C': ['C0', 'C1', 'C2', 'C3'],
    'D': ['D0', 'D1', 'D2', 'D3']
})
res = pd.merge(left, right, on=['key1', 'key2'], how='left')
boys = pd.DataFrame({
    'k': ['k0', 'k1', 'k2'],
    'age': [1, 2, 3]
})
girls = pd.DataFrame({
    'k': ['k0', 'k0', 'k3'],
    'age': [4, 5, 6]
})
res = pd.merge(boys, girls, on='k')
data = pd.Series(np.random.randn(100), index=np.arange(100))
print(data)
data.plot()
plt.show()

